package accountManagementNew.controller;

import accountManagementNew.common.base.Result;
import accountManagementNew.common.dto.UserDTO;
import accountManagementNew.common.enums.IsCreateTypeEnum;
import accountManagementNew.common.vo.UserConsumptionTypeVO;
import accountManagementNew.service.IUserConsumptionTypeService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：lihonbin
 * @Version：1.0.0
 * @Date:2025/9/16
 * @Description: 用户消费类型控制层
 */
@AllArgsConstructor
@RestController
@RequestMapping("/userConsumptionType")
public class UserConsumptionTypeController {

    private IUserConsumptionTypeService userConsumptionTypeService;

    /**
     * 查询用户所有自定义的消费类型
     * @param user  用户
     * @return 用户自定义的消费类型列表
     */
    @GetMapping("/queryAllCreateType")
    public Result<UserConsumptionTypeVO> queryAllCreateType(@RequestBody UserDTO user){
        // 判断用户是否创建了自定义的消费类型
        if (user.getIsCreateType().equals(IsCreateTypeEnum.YES)){
            return Result.success();
        }
        return Result.success();
    }
}
